package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("reset_password_and_retrieve_account")
public class ResetPasswordAndRetrieveAccount implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("手机号区号")
    private String mobileAreaCode;
    @ApiModelProperty("验证码")
    private String verifyCode;
    @ApiModelProperty("状态：0未使用；1已使用")
    private Integer state;
    @ApiModelProperty("类型：0重置密码；1找回账号；2测试；3注册")
    private Integer type;
    @ApiModelProperty("记录时间戳，计算超时用，先定5分钟")
    private Integer timestamp;
    /**
     * created_at
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    /**
     * updated_at
     */
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
}
